package com.jic.manager.api.rest;

import com.alibaba.fastjson.JSONObject;
import com.jic.common.base.vo.RestResult;
import com.jic.manager.request.MerchantRequest;
import com.jic.manager.response.MemMerchantInfoResponse;
import com.jic.manager.response.MemStoreResponse;
import com.jic.manager.response.MerchantResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 *
 * @date: 2020-01-09
 * @remark: 商家后台管理系统的服务接口
 *
 * feignClient  使用方法:
 *
 * 1.服务提供者编写 FeignClient 属性 name对应注册中心服务Id path为统一前缀  url可以直接指定调用地址（调试用）
 * 2.客户端需要在启动类上加上@EnableFeignClients注解
 * 3.如果通过feignClient调用超时，请设置
 * ribbon:
 *   ReadTimeout: 3000
 *   ConnectTimeout: 3000
 * 4.客户端依赖该jic-feign-common,在调用处@Resource注解注入 即可调用
 */
@FeignClient(name = "jic-manager",path = "/merchant")
public interface ManagerMerchantApi {
    @PostMapping("queryMerchantListByid")
    public RestResult<List<MerchantRequest>> queryMerchantListByid(@RequestBody List<Long> merchantList);

    @PostMapping("queryMerchantListByid")
    List<MerchantResponse> query(MerchantRequest merchant);

    @PostMapping("queryById")
    RestResult<MerchantResponse> queryById(Long id);

    @PostMapping("getMerchantToSett")
    List<JSONObject> getMerchantToSett();

}
